/**
 * 此文件可加载 open layers 默认地图工具
 */

import { Rotate, ScaleLine, Zoom } from 'ol/control';

export function addScaleLine(olMap) {
	olMap.addControl(
		new ScaleLine({
			units: 'metric',
		})
	);
}

export function addRotate(olMap) {
	olMap.addControl(
		new Rotate({
			autoHide: false,
		})
	);
}

export function addZoom(olMap) {
	olMap.addControl(new Zoom());
}
